﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DispatchAssist.Model
{
    public class ActionPerformLog
    {

        /// <summary>
        /// ActionPerformLog 构造函数
        /// </summary>
        public ActionPerformLog()
        { }


        /// <summary>
        /// ActionPerformLog OR映射构造函数
        /// </summary>
        public ActionPerformLog(System.Data.IDataReader dr)
        {
            this.AlertID = (Guid)dr["AlertID"];
            this.AlertAction = Convert.ToInt32(dr["AlertAction"]);
            this.PerformTime = Convert.ToDateTime(dr["PerformTime"]);
            this.UserID = (Guid)dr["UserID"];
            this.Description = Convert.ToString(dr["Description"]);
        }


        /// <summary>
        /// 告警ID
        /// </summary>
        public Guid AlertID { get; set; }

        /// <summary>
        /// 告警操作
        /// </summary>
        public int AlertAction { get; set; }

        /// <summary>
        /// 操作执行时间
        /// </summary>
        public DateTime PerformTime { get; set; }

        /// <summary>
        /// 操作用户
        /// </summary>
        public Guid UserID { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        public override string ToString()
        {
            return string.Format("[操作执行时间：{0},描述：{1}]", PerformTime.ToString(), Description);
        }
    }
}
